<%@page import="com.license.servlets.UserServlet"%>
<%@page import="com.license.servlets.EmployeeServlet"%>
<%@page import="com.license.logic.pojo.SmallEmployee"%>
<%@page import="java.util.ArrayList"%>
<%@page import="java.util.List"%>
<%@include file="AdminBasePage.jsp"%>
<f:view>
	<html>
<body>

<div class="span9" onload="wait();">
	
<div id="loading_screen">
  <h1>Calculating...</h1>
  <h3>Please Wait...</h3>
</div>




	<% User userToEdit = (User)session.getAttribute("userToEdit"); %>
	<h1 class="page-title">Recomandation</h1>
	<div class="well">
		<div id="myTabContent" class="tab-content">
			<div class="tab-pane active in" id="home">
				<form id="tab" action="../RecomandOptServlet" method="POST">	
					<div>
						Select Employee : <select name="employeeName" > 
						 <%  
						 EmployeeServlet employeeServlet = new EmployeeServlet();
						 List<SmallEmployee> employeeList = employeeServlet.getAllSmallEmployees();
					    int i=0;
					    String employeeName = "";
					    if (employeeList != null){
					    for (SmallEmployee employee : employeeList){
					    	i=i+1;
					    	employeeName = employee.getUsername();%>
							<option value="<%=employeeName%>"><%=employeeName%></option>
							<%  }} %>
						</select>
					</div>
					<div>
						Select operation:	<select name="operationRecomandation" onchange="setVisibilityForParetoOptimal()">  
							<option value="PSO">Partical Swarm Optimization</option>
							<option value="CSO">Clonal Selection Optimization</option>
							</select> 
					</div>
					<div id="divParetoOptimalMethod">
						Select Pareto Optimal Method:	<select name="paretoOptimalMethod" >  
							<option value="1">Pareto Optimal 1</option>
							<option value="2">Pareto Optimal 2</option>
							</select> 
					</div>
					<div>
					Select individs number : 
					<input type="text" id="individNumberId" name="individNumber" class="input-xlarge" />
					</div>
					<div>
					Select iteration number : 
					<input type="text" id="iterationNumberId" name="iterationNumber" class="input-xlarge" />
					</div>
					
			 		<input class="btn btn-primary" type="submit" value="Generate Recomandation" onclick="display_loading_screen();"/>
			
				</form>
			</div>
		</div>

	</div>

</div>
</div>
<footer>
	<hr>
	<!-- Purchase a site license to remove this link from the footer: http://www.portnine.com/bootstrap-themes -->
	<p class="pull-right">
		Procadio <a href="#" target="_blank">best lifestile recomandation
			software</a>
	</p>
	<p>
		&copy; 2013 <a href="#">Cozac Adrian & Mesaros Ionut</a>
	</p>
</footer>
<!-- Le javascript
    ================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
</body>
	</html>
</f:view>